<template>
  <div class="common-layout">
    <el-container>
      <el-aside :width="width" ><Asiade :status="status"></Asiade></el-aside>
      <el-container>
        <el-header><Header @update="update"></Header></el-header>
        <el-main><router-view/></el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup>
import Asiade from "./Aside.vue"
import Header from './Header.vue';
import {ref} from 'vue';
var width=ref("200px");
const status=ref(false)
const update = value=>{
    status.value = value;
    if(value){
      width.value= '65px';
    }else{
      width.value='200px';
    }
}
</script>

<style scoped>

.common-layout{
    height: 100vh;
}
.el-main{
  width: 100%;
}
.el-header{
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}
.el-aside{
    height: 100vh;
}
</style>